package com.zxy.web.action;

import com.opensymphony.xwork2.ModelDriven;
import com.zxy.biz.UsersBiz;
import com.zxy.entity.Users;

public class UsersAction extends BaseAction implements ModelDriven<Users> {
	public String login() throws Exception {
		System.out.println("login:" + users);
		Users user = usersBiz.login(users.getName(), users.getPassword());
		if (user == null) {
			return INPUT;
		}
		return SUCCESS;
	}

	private Users users = new Users();

	@Override
	public Users getModel() {
		return users;
	}

	private UsersBiz usersBiz;

	public void setUsersBiz(UsersBiz usersBiz) {
		this.usersBiz = usersBiz;
	}
}
